package com.jiyun.feign;



import com.jiyun.entity.day06.Contest;
import com.jiyun.vo.ResponseBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("day06-contest")
public interface ContestFeign {
    @RequestMapping("/findByName")
    public ResponseBean findByName();

    @RequestMapping("/findContestNewTime")
    public ResponseBean findContestNewTime();

    @RequestMapping("/findByAll")
    ResponseBean findByAll(Contest contest);

    /**
     * 根据竞赛id查询
     * @param id
     * @return
     */
    @RequestMapping("userContest/findByContestId")
    ResponseBean findByContestId(@RequestParam("id") Integer id);

    /**
     * 添加用户竞赛表
     * @param id
     * @return
     */
    @RequestMapping("userContest/addUserContest")
    ResponseBean addUserContest(@RequestParam("id") Integer id,@RequestParam("squadsId")Integer squadsId);
    /**
     * 根据培训id查询战队名称
     * @param contestId
     * @return
     */
    @RequestMapping("userContest/findByContestByName")
    ResponseBean findByContestByName(@RequestParam("contestId") Integer contestId);
    /**
     * 根据培训id，查询测验
     */
    @RequestMapping("findContestByTraining")
    public ResponseBean findContestByTraining(@RequestParam("id") Integer id);
}
